package com.songqi.common.log.config;

import com.songqi.common.log.aspect.LogAspect;
import com.songqi.common.log.service.AsyncLog;
import com.songqi.common.log.service.LogApi;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;

/**
 * @description:
 * @author: songqi(13776346982)
 * @date: 2022/9/6 17:01
 */
public class LogAutoConfiguration {


    @Bean
    public LogAspect logAspect(){
        return new LogAspect();
    }

    @Bean
    @ConditionalOnBean(value = LogApi.class)
    public AsyncLog asyncLog(){
        return new AsyncLog();
    }
}
